<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>选择器权重</title>
		<!-- 选择器权重越高，选中几率越大 -->
		<style>
			*{ /*权值 0  很容易被覆盖*/
				color: #00aa00 !important;
				background: #aaaaff !important;
			}
			div{ /*权值 1 */
				color: #ff5500;
				background: #ffaaff;
			}
			.dl{ /*权值 10 */
				color: #ff007f;
				background: #0000ff;
			}
			div.dl{ /*选择器权值之和  权值1+10 11*/
				color: #a4ffdc;
				background: #ff9318;
			}
			body div.dl{ /*权值 12 */
				font-size: 25px;
				color: #aaaaff;
				background: #ff0;
			}
			#d1{/*权值100*/
				font-size: 15px;
				color: #ff0101;
				background: #aaff00;
			}
			div#d1{/*权值101*/
				font-size: 20px;
				color: #73eee4;
				background: #4aee8b;
			}
			div#dl:hover{/*权值 111*/
				color: #aaaaff;
				background: #aaff00;
			}
		</style>
	</head>
	<body>
		<div class="dl" id="d1" style="color:red">Lorem ipsum dolor sit amet consectetur adipisicing elit. Sit aut asperiores quae voluptate distinctio numquam commodi nobis illo necessitatibus? Tempora doloremque deserunt laborum ratione minus, saepe molestias quam nam vitae.</div>
	</body>
</html>